package com.mapull.example.section1;

/**
 * @author Mapull
 * @date 2024-03-19
 */
public class StringMatch {
    public static void main(String[] args) {
        boolean matches1 = "Java".matches("\\w{4}");
        System.out.println(matches1);
        boolean matches2 = "12345".matches("\\d.*");
        System.out.println(matches2);
        boolean matches3 = "hello".matches("\\s");
        System.out.println(matches3);
        boolean matches = "test".matches("(");
        System.out.println(matches);
    }
}
